{% extends 'book_list.html' %}

{% block main %}
    <div class="panel panel-primary">
        <div class="panel-heading">新增书籍</div>
        <div class="panel-body">
            <form class="form-horizontal" action="" method="post">
                <div class="form-group has-error">
                    <label for="inputEmail3" class="col-sm-2 control-label">书籍名称</label>
                    <div class="col-sm-8">
                        <input type="text" name="book_name" class="form-control" id="inputEmail3"
                               placeholder="请输入书籍名称">
                        <span id="helpBlock2" class="help-block">{{ error }}</span>
                    </div>
                </div>
                <div class="form-group has-error">
                    <label for="inputEmail3" class="col-sm-2 control-label">出版社</label>
                    <div class="col-sm-8">
                        <select name="pub_id" id="" class="form-control">
                            {% for publisher in all_publisher %}
                                <option value="{{ publisher.pk }}">{{ publisher.name }}</option>
                            {% endfor %}
                        </select>
                    </div>
                    </label>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-default">提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
{% endblock %}


